home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 223_01 / strchr.c < prev    next >
Text File  |  1980-01-01  |  384b  |  11 lines

  1. /*
  2. ** return pointer to 1st occurrence of c in str, else 0
  3. */
  4. strchr(str, c) char *str, c; {
  5.   while(*str) {
  6.     if(*str == c) return (str);
  7.     ++str;
  8.     }
  9.   return (0);
  10.   }
  11.